﻿@model IEnumerable<TracNghiem.Areas.Admin.Models.BaiThi_CTModel>
@{
    string cau_hoi_id = "";
    int stt = 0;
    int count = 1;
    int count_cau_dung = 0;
}
<div class="container_12">
    <div class="grid_12">
        <div class="module">
                <h2 align="right">
                <span><a href="@Url.Action("Index", "Report")">Quay lại</a></span></h2>
            
            <div class="module-body">
                <h1 align="center">Kết quả trắc nghiệm</h1>
                <h3>
                    Trung tâm: @ViewBag.don_vi
                    <br>
                    Tên đăng nhập: @ViewBag.user_name
                    <br>
                    Họ tên: @ViewBag.ho_ten
                    <br>
                    Ngày thi: @ViewBag.ngay_thi
                </h2>
                @foreach (var item in Model)
                {
                    stt++;
                    if (cau_hoi_id != item.cau_hoi_id.ToString())
                    {
                        if (item.trang_thai == "dung")
                        {
                    <img src="@Url.Content("~/Content/themes/template/style/images/true.png")" width="15px" height="15px" />
                            count_cau_dung++;
                        }
                        else
                        {
                    <img src="@Url.Content("~/Content/themes/template/style/images/false.png")" width="15px" height="15px" />
                        }
                    <b>Câu @count: @item.ten_cau_hoi</b>
                    @Html.Raw("<br>")
                        count++;
                    } 
                    <input type="checkbox" value="1" @(item.user_status == "1" ? "checked=checked" : "") name='cb' />
                    <span>@item.ten_cau_tl</span>
                    @Html.Raw("<br>")          
                    cau_hoi_id = item.cau_hoi_id;
                }
                <b>Tổng số câu đúng: @(count_cau_dung + "/" + (count - 1))
                </b>
            </div>
        </div>
    </div>
</div>
</div> 